package com.phonetools.commonutils.android

import android.content.Context
import android.location.LocationManager
import android.net.wifi.WifiManager
import android.telephony.TelephonyManager

/**
 * 获取WifiManager
 * @return WifiManager
 */
fun getWifiManager(context: Context): WifiManager =
    context.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager

/**
 * 获取LocationManager
 * @return LocationManager
 */
fun getLocationManager(context: Context): LocationManager =
    context.getSystemService(Context.LOCATION_SERVICE) as LocationManager

/**
 * 获取TelephonyManager
 * @return TelephonyManager
 */
fun getTelephonyManager(context: Context): TelephonyManager =
    context.getSystemService(Context.TELEPHONY_SERVICE) as TelephonyManager
